API Documentation
Public Member Functions | List of all members
nkGraphics::InstancingPass Class Reference

A pass doing an instanced draw, during which one mesh is drawn X times, in one go. More...

Inheritance diagram for nkGraphics::InstancingPass:
nkGraphics::Pass nkGraphics::ProfilableClass nkExport::Exportable

Public Member Functions

Mesh * getToRender () const
 
unsigned int getInstanceNumber () const
 
Shader * getShader () const
 
Camera * getRenderCam () const
 
Camera * getCullingCam () const
 
Camera * getLodCam () const
 
BlendState * getBlendState () const
 
RasterState * getRasterState () const
 
DepthStencilState * getDepthStencilState () const
 
virtual void setToRender (Mesh *object)
 
void setInstanceNumber (unsigned int value)
 
virtual void setShader (Shader *value)
 
void setRenderCam (Camera *value)
 
void setCullingCam (Camera *value)
 
void setLodCam (Camera *value)
 
virtual void setBlendState (BlendState *holder)
 
virtual void setRasterState (RasterState *holder)
 
virtual void setDepthStencilState (DepthStencilState *holder)
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkGraphics::Pass
TargetOperations * getParentTargetOperations () const
 
PASS_TYPE getPassType () const
 
nkMemory::StringView getName () const
 
void setParentTargetOperations (TargetOperations *parent)
 
void setName (const nkMemory::StringView &name)
 
virtual void render ()=0
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable ()
 
virtual ~Exportable ()
 

Detailed Description

A pass doing an instanced draw, during which one mesh is drawn X times, in one go.

Can be used to draw a lot of instance of a mesh in one go, bypassing the rendering queue logic and being more efficient.
See TargetOperations::addInstancingPass to use it.

Member Function Documentation

◆ getToRender()

Mesh* nkGraphics::InstancingPass::getToRender ( ) const
Returns
The mesh the pass should render.

◆ getInstanceNumber()

unsigned int nkGraphics::InstancingPass::getInstanceNumber ( ) const
Returns
The number of instance drawn.

◆ getShader()

Shader* nkGraphics::InstancingPass::getShader ( ) const
Returns
The shader used to render the instances.

◆ getRenderCam()

Camera* nkGraphics::InstancingPass::getRenderCam ( ) const
Returns
The render camera used for the pass.

◆ getCullingCam()

Camera* nkGraphics::InstancingPass::getCullingCam ( ) const
Returns
The culling camera used for the pass.

◆ getLodCam()

Camera* nkGraphics::InstancingPass::getLodCam ( ) const
Returns
The LOD camera used for the pass.

◆ getBlendState()

BlendState* nkGraphics::InstancingPass::getBlendState ( ) const
Returns
The blend state used during the pass.

◆ getRasterState()

RasterState* nkGraphics::InstancingPass::getRasterState ( ) const
Returns
The raster state used during the pass.

◆ getDepthStencilState()

DepthStencilState* nkGraphics::InstancingPass::getDepthStencilState ( ) const
Returns
The depth and stencil state used during the pass.

◆ setToRender()

virtual void nkGraphics::InstancingPass::setToRender ( Mesh *  object)
virtual

Sets the mesh to render in the pass.

Parameters
objectThe mesh to render.

◆ setInstanceNumber()

void nkGraphics::InstancingPass::setInstanceNumber ( unsigned int  value)

Sets the number of instances to render.

Parameters
valueThe number of instances to render.

◆ setShader()

virtual void nkGraphics::InstancingPass::setShader ( Shader *  value)
virtual

Sets the shader to use during the pass.

Parameters
valueThe shader to use. Needs to be a pipeline shader.

◆ setRenderCam()

void nkGraphics::InstancingPass::setRenderCam ( Camera *  value)

Sets the render camera to use during the pass.

Parameters
valueThe camera to use.

◆ setCullingCam()

void nkGraphics::InstancingPass::setCullingCam ( Camera *  value)

Sets the culling camera to use during the pass.

Parameters
valueThe camera to use.

◆ setLodCam()

void nkGraphics::InstancingPass::setLodCam ( Camera *  value)

Sets the LOD camera to use during the pass.

Parameters
valueThe camera to use.

◆ setBlendState()

virtual void nkGraphics::InstancingPass::setBlendState ( BlendState *  holder)
virtual

Sets the blend state to use during the pass.

Parameters
holderThe blend state to use.

◆ setRasterState()

virtual void nkGraphics::InstancingPass::setRasterState ( RasterState *  holder)
virtual

Sets the raster state to use during the pass.

Parameters
holderThe raster state to use.

◆ setDepthStencilState()

virtual void nkGraphics::InstancingPass::setDepthStencilState ( DepthStencilState *  holder)
virtual

Sets the depth and stencil state to use during the pass.

Parameters
holderThe depth and stencil state to use.

◆ exportClassToTree()

virtual void nkGraphics::InstancingPass::exportClassToTree ( nkExport::Node *  rootNode)
overridevirtual

Basic exporting capabilities.

Parameters
rootNodeThe tree to export to.

Reimplemented from nkGraphics::Pass.

◆ importClassFromTree()

virtual void nkGraphics::InstancingPass::importClassFromTree ( nkExport::Node *  rootNode)
overridevirtual

Basic importing capabilities.

Parameters
rootNodeThe tree to import from.

Reimplemented from nkGraphics::Pass.


The documentation for this class was generated from the following file: